<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Admin/NewsClass/index')}">新闻分类</a></li>
			<li><a href="{:U('Admin/NewsClass/add')}">添加新闻分类</a></li>
		</ul>
		
		<form class="js-ajax-form" action="{:U('Admin/NewsClass/listorders')}" method="post" >
		<div class="table-actions">
				<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
			</div>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">{:L('SORT')}</th>
					<th width="300">分类ID</th>
					<th>分类名称</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data" item="vo">
				<tr>
					<th width="50"><input name="listorders[{$vo.cId}]" type="text" size="3" value="{$vo.sI}" class="input input-order"></th>
					<td>{$vo.cId}</td>
					<td>{$vo.cN}</td>
					<td>
						<a href='{:U("Admin/NewsClass/edit",array("cId"=>$vo["cId"],"cN"=>$vo["cN"],"order"=>$vo["sI"]))}'>编辑</a>
						<a href='{:U("Admin/NewsClass/del",array("cId"=>$vo["cId"]))}' class="js-ajax-delete">删除</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="table-actions">
				<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
			</div>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		
	});
	</script>
</body>
</html>